var swfu;
var timerId;
// 获取文件处理进度次数
function uploadPic(index, uId) {
	var gainProgressNum = 0;
	var exeluploader = new qq.FineUploader({
				element : $('#file_btn_' + index)[0],
				text : {
					uploadButton : '上传图片',
					cancelButton : '取消'
				},
				request : {
					endpoint : '../pics/upload',
					params : {
						"activityId" : $("#activityId").val(),
						"companyUserId" : uId,
					}
				},
				messages : {
					typeError : "文件类型错误,只能导入图片文件",
					sizeError : "最大只能上传10M文件",
					minSizeError : "{file} is too small, minimum file size is {minSizeLimit}.",
					emptyError : "{file} is empty, please select files again without it.",
					noFilesError : "请选择需要导入的文件",
					tooManyItemsError : "Too many items ({netItems}) would be uploaded.  Item limit is {itemLimit}.",
					retryFailTooManyItems : "Retry failed - you have reached your file limit.",
					onLeave : "The files are being uploaded, if you leave now the upload will be cancelled."
				},
				autoUpload : true,
				multiple : true,
				validation : {
					allowedExtensions : [ 'jpg', 'jpeg', 'bmp', 'gif', 'png' ],
					sizeLimit : 10485760
				// 10M
				},
				callbacks : {
					onSubmit : function(id, fileName) {
						$("#fileName").val(fileName);
						$(".qq-upload-list").hide();
					},
					onComplete : function(info, result) {
						if (info) {
							alert(info);
						} else if (result ) {
							$.myMessager.alert({
								'title' : '温馨提示',
								'msg' : '<p><strong>上传成功！</strong></p>'
							});
						} else {
							$('#float_laycon').empty().append(
									'<p><strong>' + info + '</strong></p>');
						}

					}
				},
				debug : true
			});
}

function checkUpload() {
	$("#processMsg").hide();
	$("#processMsgTabl").empty();
	$("#progressNum").html("0%");
	$("#progressBar").css('width', "0%");
	$("#uploadTip").hide().html('');
	var filePath = $.trim($("#fileName").val());
	if (filePath.length <= 0) {
		$("#uploadTip").show().html('请选择导入文件!');
		return false;
	}
	return true;
}